package cn.tianya.irock.data.idal;

import java.util.List;
import java.util.Map;

import cn.tianya.irock.core.DateTime;
import cn.tianya.irock.data.model.Post;
import cn.tianya.irock.data.model.SearchQuery;
import cn.tianya.irock.enums.SortOrder;
import cn.tianya.irock.enums.SortPostsBy;
import cn.tianya.irock.util.DataSet;


public interface IPostDataProvider {
	Post getPost(int postId);
	
	Post add(Post post, int userId , boolean autoApprove);
	void update(int postId, Map<String, Object> values, List<String> fields);
	void update(int threadId, int parentId, Map<String, Object> values, List<String> fields);
	void move(List<Integer> postIds, int moveToThreadId, int moveToSectionId);
 
		
	int getTotalPostCount(int sectionId);
	int getIPPostCount(List<SearchQuery> querys, DateTime postsNewerThan, DateTime postsOlderThan);

	DataSet<Post> getPosts(List<Integer> threadIds, int userId, int pageIndex, int pageSize, DateTime postsNewerThan, DateTime postsOlderThan, int status, SortPostsBy sortBy, SortOrder sortOrder);
}
